package cn.mymall.vo;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

@Getter
@Setter
public abstract class BaseReqVo implements Serializable {
    private static final long serialVersionUID = 1L;
    private Integer pageNo = 1;
    private Integer pageSize = 20;

    public Integer getPageSize(){
        if(pageSize==null){
            return 20;
        }
        if(this.pageSize > 1000){
            return 100;
        }
        return pageSize;
    }

    public Integer getPageNo() {
        if(pageNo==null){
            pageNo = 1;
        }
        return pageNo;
    }
}
